<?php

namespace App\Http\Controllers\Ajax;

use App\Common\Constant\Status;
use Illuminate\Http\Request;

class ValidateController extends BaseController
{

    /**
     * 检查手机号是否已被使用
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function phoneExists(Request $request){
        if ($request->has('value')){
            return $this->renderJson($request->input('value') ? Status::ERROR : Status::SUCCESS);
        }
        return $this->renderJson(Status::ERROR);
    }
}
